import React from 'react';
import {
    useNavigate
} from "react-router-dom"
function Home(props) {
    const navigate = useNavigate();
    return (
        <div>
            <h3>首页</h3>
            <button onClick={()=>{
                navigate("/one?a=9&b=99")
            }}>ONE4</button>
            <button onClick={()=>{
                navigate({
                    pathname:"/one?a=99&b=999"
                })
            }}>ONE5</button>
            <button onClick={()=>{
                navigate({
                    pathname:"/one",
                    search:"a=999&b=99999"
                })
            }}>ONE6</button>
        </div>
    );
}

export default Home;